public class Teacher {
    private String id;
    private String name;

    public Teacher(String id, String name) {
        this.id = id;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void offerCourse(Course course) {
        course.setTeacher(this);
        System.out.println(name + "老师开设了课程: " + course.getCourseName());
    }
}